import { createStore } from "vuex";

export default createStore({
  state: {
    user: {
      username: "shanliangdeYWJ",
      age: 24,
      password: "123456",
    },
  },
  mutations: {
    toggle(state) {
      state.user.username === "shanliangdeYWJ"
        ? (state.user.username = "")
        : (state.user.username = "shanliangdeYWJ");
    },
  },
  actions: {},
  modules: {},
});
